-- #lazgen HEADER#
/*
	spTechnologyUpdate.

	This procedure updates a single Technology in the database.
*/
SET ANSI_NULLS ON
GO

ALTER PROCEDURE [spTechnologyUpdate]
(		
	@id INT,
	@title VARCHAR( 50 ),
	@description TEXT,
	@expertiseLevelId INT,
	@modified DATETIME

) AS
		
BEGIN
-- #endlazgen HEADER#

-- #lazgen BODY#

BEGIN TRANSACTION;

UPDATE
	[tblTechnology]
SET
	[Title] = @title,
	[Description] = @description,
	[ExpertiseLevelId] = @expertiseLevelId
WHERE
	[Id] = @id


			
IF @@ERROR <> 0 
BEGIN
   -- Return 99 to the calling program to indicate failure.
   PRINT 'An error occurred.'
   ROLLBACK TRANSACTION;
   RETURN(99)
END

SET @id = SCOPE_IDENTITY();
		
COMMIT TRANSACTION;

-- #endlazgen BODY#


-- #lazgen FOOTER#

END

GO

SET ANSI_NULLS OFF
GO   
-- #endlazgen FOOTER#
